package fakeSmarthouseHW;

import java.util.Hashtable;
import java.util.LinkedList;

import devices.Heater;

public class FakeLight extends FakeDevice{
	
	public int light = 20;
	public int red = 40;
	public int green = 60;
	public int blue = 80;
	
	public FakeLight(int id) {
		super(id);
	}
	
@Override
public void execCommand(int deviceId, int commandId,
		LinkedList<Object> params) {
	
	if (deviceId!=id) return;
	switch (commandId){
		case 0: light = (Integer) params.get(0);
		case 1: red= (Integer) params.get(1);
		case 2: green= (Integer) params.get(2);
		case 3: blue= (Integer) params.get(3);
	}
	
}

@Override
public LinkedList<Object> getData() {
	LinkedList<Object> data = new LinkedList<Object>();
	data.add(light);
	data.add(red);
	data.add(green);
	data.add(blue);
	return data;
}

}
